package com.ocpap.rest.serviceImpl;

import com.ocpap.rest.entity.GoodsDict;
import com.ocpap.rest.mapper.GoodsDictMapper;
import com.ocpap.rest.service.WordDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WordDictServiceImpl implements WordDictService {

    @Autowired
    private GoodsDictMapper goodsDictMapper;

    @Override
    public int insert(GoodsDict goodsDict) {
        return goodsDictMapper.insertSelective(goodsDict);
    }

    @Override
    public int update(GoodsDict goodsDict) {
        return goodsDictMapper.updateByPrimaryKeySelective(goodsDict);
    }

    @Override
    public GoodsDict findById(Integer id) {
        return goodsDictMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<GoodsDict> findAll(GoodsDict goodsDict) {
        return goodsDictMapper.findAll(goodsDict);
    }
}
